import request from '@/router/axios';

export const getList = (params) => {
  return request({
    url: '/api/mes-product/mro/centerproduct/list',
    method: 'get',
    params: {
      statusStr: 2,
      ...params
    }
  });
};

export const submit = (data, workshopId, centerId) => {
  return request({
    url: `/api/mes-product/mro/centerproduct/repair-in?workshopId=${workshopId}&centerId=${centerId}`,
    method: 'post',
    data
  });
};

// 获取维修工站列表
export const getCenterList = (params) => {
  return request({
    url: '/api/mes-product/mro/operatingcenter/list',
    method: 'get',
    params: {
      ...params
    }
  });
};
